Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Increment level only for methods/classes/packages listed in WatchedCustomServices (instead of every watched method/class/package) #452

Closed
wants to merge 1 commit into from

Conversation

eshaanganesh2
Copy link

@eshaanganesh2 eshaanganesh2 commented Mar 14, 2024

What:
The level count increases every time we encounter a watched method, class, or package, regardless of whether it's present in the WatchedCustomServices list or not. Through this PR, I have made some changes to instead increase the level count only when a watched method (or class or package) is listed in WatchedCustomServices.
More details on this can be found at #451

Why:
These changes would help improve predictability wherein only methods/classes/packages listed within the WatchedCustomServices would increase level counts, as opposed to any and every watched method doing the same.

How:
Changes have been made within the logic of callChaosMonkey(ChaosTarget type, String simpleName) function present in the ChaosMonkeyRequestScope.java file.
A check has been implemented to verify if WatchedCustomServices is active and if the exact same method is present in WatchedCustomServices . If yes, only then the level count is incremented.

Checklist:

  • Documentation added
  • Changelog updated
  • Tests added
  • Ready to be merged

…stomServices (instead of every watched method/class/package)
@denniseffing
Copy link
Member

denniseffing commented Jan 17, 2025

Hi @eshaanganesh2,
I'll close this PR in favor of #532. The code to determine whether or not an attack should be run was already a mess before you changed it and this PR made it slightly worse. However, we really appreciate the effort you put into the issue description and this PR. You are awesome and we credited you in the changelog accordingly. 🥳

And sorry that it took so long!

@denniseffing denniseffing self-requested a review January 17, 2025 15:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants